import useRequest from '@/hooks/useRequest';
const { request, post, get } = useRequest();

//获取发布协同表单
export const getCoopPubFields = (data ?: any) => {
	return request({
		url: 'lawyer/cooperate/get_pub_fields',
		method: 'get',
		data: data
	});
};
// 获取协同分类列表
export const getCoopCateList = (data ?: any) => {
	return request({
		url: 'lawyer/cooperate/get_cate_list',
		method: 'get',
		data: data
	});
};
// 发布协同
export const doCoopPubOrder = (data ?: any) => {
	return request({
		url: 'lawyer/cooperate/pub_order',
		method: 'post',
		data: data
	});
}
// 协同支付
export const doCoopPayment = (data ?: any) => {
	return request({
		url: 'lawyer/cooperate/payment',
		method: 'post',
		data: data
	});
}
// 我发布的协同
export const getMyPubCoopOrder = (data ?: any) => {
	return request({
		url: 'lawyer/cooperate/my_pub_order_list',
		method: 'post',
		data: data
	});
}
// 接单广场
export const getCoopMarketOrderList = (data ?: any) => {
	return request({
		url: 'lawyer/cooperate/market_order_list',
		method: 'post',
		data: data
	});
}
// 协同详情
export const getCoopOrderInfo = (data ?: any) => {
	return request({
		url: 'lawyer/cooperate/query_order_info',
		method: 'post',
		data: data
	});
}


// 接单
export const doCoopReceiveOrder = (data ?: any) => {
	return request({
		url: 'lawyer/cooperate/receive_order',
		method: 'post',
		data: data
	});
}
// 我的接单
export const getCoopMyReceiveList = (data ?: any) => {
	return request({
		url: 'lawyer/cooperate/my_receive_order_list',
		method: 'post',
		data: data
	});
}

// 获取提交表单
export const getCoopMyReceiveSubmitFields = (data ?: any) => {
	return request({
		url: 'lawyer/cooperate/get_receive_fields',
		method: 'get',
		data: data
	});
}


export const doSaveOrderInfo = (data ?: any) => {
	return request({
		url: 'lawyer/cooperate/save_order_info',
		method: 'post',
		data: data
	});
}
// 完成提交协同
export const doFinishOrder = (data ?: any) => {
	return request({
		url: 'lawyer/cooperate/finish_order',
		method: 'post',
		data: data
	});
}

// 发布者订单确认 
export const doCoopComfirmFinish = (data ?: any) => {
	return request({
		url: 'lawyer/cooperate/comfirm_finish',
		method: 'post',
		data: data
	});
}

// 发布者售后 
export const doCoopOrderBack = (data ?: any) => {
	return request({
		url: 'lawyer/cooperate/order_back',
		method: 'post',
		data: data
	});
}

// 售后详情 
export const getQueryOrderBackInfo = (data ?: any) => {
	return request({
		url: 'lawyer/cooperate/query_order_back_info',
		method: 'post',
		data: data
	});
}